const path = require('path')
module.exports = {
  devServer:{
    port: 9527,
    open: true,
    proxy:{
      "/api":{
        target:'http://rap2api.taobao.org/app/mock/270164',
        changeOrigin:true,
        pathRewrite:{
          '^/api':'/api'
        }
      }
    }
  },
  babel:{
    plugins: [
      ['import', {
        libraryName: 'antd',
        libraryDirectory: 'es',
        style: 'css'
      }, 'antd']
    ]
  },
  webpack: {
   alias:{
     "@": path.join(__dirname,'src'),
     "routes": path.join(__dirname,'src/routes'),
     "components": path.join(__dirname,'src/components'),
     "pages": path.join(__dirname,'src/pages'),
     "utils": path.join(__dirname,'src/utils'),
     "api": path.join(__dirname,'src/api'),
     "store": path.join(__dirname,'src/store')
   }
  }
}